package com.yoyo.common.core.enums;

import lombok.Data;

@Data
public class ErrorResponse {
    private String code;
    private String message;
    private Object data;

    public ErrorResponse(ErrorCode errorCode, String message) {
        this.code = errorCode.getCode();
        this.message = message;
    }

    public ErrorResponse(ErrorCode errorCode, String message, Object data) {
        this.code = errorCode.getCode();
        this.message = message;
        this.data = data;
    }
}
